package com.andy;

import android.app.Application;

/**
 * Created by Andy on  2024/4/24 1:05
 * Email: 963069079@qq.com
 */
public class MyApplication extends Application {

    /**
     * 全局Context，原理是因为Application类是应用最先运行的，所以在我们的代码调用时，该值已经被赋值过了
     */
    private static MyApplication mInstance;

    /**
     * 获得Application的实例
     *【
     * @return Application
     */
    public static MyApplication getApplication() {
        return mInstance;
    }

    public void onCreate() {
        super.onCreate();
        mInstance = this;
    }
    @Override
    public void onTerminate() {
        super.onTerminate();
    }
}
